Digitized Sound

For Linux and Suns, you can play u-law-encoded digitized sound files. Make sure that /dev/audio is writable for everyone. The directory for the sound files (its default is /usr/games/lib/xpat) is compiled into the module named X-sound_SUN.o. The directory is given by the LIBDIR macro, which must be defined when you compile X-sound_SUN.c.

Technically, the sound module just copies an audio file to AUDIO_DEVICE, which is "/dev/audio" by default, but may be changed at compile-time. If your sound device has another name, you give an alternate definition in the Imakefile. If you want to play WAV-files, or other formats which require an explicit program to play them, you may direct AUDIO_DEVICE to a named pipe, for example /tmp/audio, and start a background program reading this pipe. A sample WAV-player, etc/wavplay.c, is included in the source distribution, but as sound isn't basic to xpat2, you're on your own if you want to use this or a similar program.